/*
* ============================================================================
*  Name        : example_005.hxx
*  Part of     : Finite state machine examples
*  Description : State machine body
*  Version     : %version: %
*  
*
* ============================================================================
*/
/**
    @code
    SM_DECLARE
    (
        Parent_src,
        Parent
        async
        {
            Exceptions
            {
                // In case framework wants to terminate me
                Ev_Sys_Terminate        exit            nojump
            }
            Main
            {
                // In case child dies
                Ev_Sys_ChildTerminated  exit            nojump  
            }
        } 
    );

    SM_DECLARE
    (
        Child_src,
        Parent
        async
        {
            Exceptions
            {
                // In case framework wants to terminate me
                Ev_Sys_Terminate        exit            nojump
            }
            Main 300 1
            {
                // In case parent dies
                Ev_Sys_ParentTerminated exit            nojump  
                
                // My normal termination
                Ev_Sys_LastHeartbeat    exit            nojump  
            }
        } 
    );
    @endcode
*/

SM_DECLARE
(
    Parent_src,
    Parent
    async
    {
        Exceptions
        {
            // In case framework wants to terminate me
            Ev_Sys_Terminate        exit            nojump
        }
        Main
        {
            // In case child dies
            Ev_Sys_ChildTerminated  exit            nojump  
        }
    } 
);

SM_DECLARE
(
    Child_src,
    Parent
    async
    {
        Exceptions
        {
            // In case framework wants to terminate me
            Ev_Sys_Terminate        exit            nojump
        }
        Main 300 1
        {
            // In case parent dies
            Ev_Sys_ParentTerminated exit            nojump  
            
            // My normal termination
            Ev_Sys_LastHeartbeat    exit            nojump  
        }
    } 
);

